import { getSwiperListApi, getHotCateListApi, getGoodFoodListApi } from "@/services/MenuService";


const actionCreateCreatorAddSwiper = data=>({type:"setSwiper",data})
export const getSwiperListAction = ()=>async dispatch=>{
    const data = await(await getSwiperListApi()).data
    dispatch(actionCreateCreatorAddSwiper(data))
}

const actionCreateCreatorAddHotcate = data=>({type:"setHotCate",data})
export const getHotCateListAction = ()=>async dispatch=>{
    const data = await (await getHotCateListApi()).data
    dispatch(actionCreateCreatorAddHotcate(data))
}

const actionCreateCreatorAddFoodList = data=>({type:"setGoodFood",data})
export const getGoodFoodListAction = (Limit=2)=> async dispatch=>{
    const data = await (await getGoodFoodListApi(Limit)).data
    dispatch(actionCreateCreatorAddFoodList(data))
}
